<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script type="text/Javascript">
       /*
           编写程序,由键盘输入三个证书,分别存入变量num1,num2,num3;
           对他们进行排序,并且由小到大输出;

       */
      var num1, num2,num3;
      num1 = prompt("输入第一个数字");
      num2 = prompt("输入第二个数字");
      num3 = prompt("输入第三个数字");
        if (num1<num2 && num2<num3 && num1<num3) {
            alert(num1+","+num2+","+num3);
        }
       else if (num1<num2 && num3<num2 && num1<num3) {
            alert(num1+","+num3+","+num2);
        }
       else if (num2<num3 && num3<num1 && num2<num3) {
            alert(num2+","+num3+","+num1);
        }
       else if (num2<num3 && num1<num3 && num2<num3) {
            alert(num2+","+num1+","+num3);
        }   // 1        3           4
       else if (num3<num2 && num2<num1 && num3<num1) {
            alert(num3+","+num2+","+num1);
        }
       else if (num3<num2 && num1<num2 && num3<num2){
            alert(num3+","+num1+","+num2);
       }else{
            alert("没有输入数字")
       }
    </script>
  </head>
  <body></body>
</html>
